<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@include file="template/header.jsp"%>

<!--  <div id="container">-->




<%@include file="template/menu.jsp"%>


<!--  </div>-->

<!--end box-menu-->
<div style="width: 1000px; display: inline-block; float: left;">

	<p id="title-affect"
		style="margin: 20px; padding-left: 50px; font: 30px Calibri, Bold, Helvetica, sans-serif;">
		le niveau :
		<c:out value="${niveauSpecialiteBundle.niveau}"></c:out>
		est affecté aux salles suivantes

	</p>
	<table id="box-table-a" summary="Employee Pay Sheet">
		<thead>
			<tr>
				<th scope="col">salle</th>
				<th scope="col">nbreResident</th>
				<th scope="col">nbreEnseignant</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${availableSalles}" var="salle">
				<tr>

					<td><c:out value="${salle.designation}"></c:out></td>
					<td><c:out value="${salle.nbRes}"></c:out></td>
					<td><c:out value="${salle.nbEns}"></c:out></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>

	<p id="title-affect"
		style="margin: 20px; padding-left: 50px; font: 30px Calibri, Bold, Helvetica, sans-serif;">
		liste des surveillants</p>
	<form:form method="POST" commandName="surveillantIds">
		<table id="box-table-a" summary="Employee Pay Sheet">
			<thead>
				<tr>
					<th scope="col"></th>
					<th scope="col">nom</th>
					<th scope="col">prenom</th>
					<th scope="col">resident</th>
					<th scope="col">enseignant</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${fetchedSurveillants}" var="surveillant">
					<tr>
						<td><form:checkbox path="surveillantId"
								value="${surveillant.id}"></form:checkbox></td>
						<td><c:out value="${surveillant.nom}"></c:out></td>
						<td><c:out value="${surveillant.prenom}"></c:out></td>
						<c:choose>
							<c:when
								test="${surveillant.getClass().getName() eq 'com.surveillance.entities.Enseignant' }">
								<td></td>
								<td>X</td>
							</c:when>
							<c:otherwise>
								<td>X</td>
								<td></td>
							</c:otherwise>
						</c:choose>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		<div>
			<input type="submit" class="large button blue"
				style="margin-left: 300px; margin-bottom: 20px;" />Affecter &raquo;
		</div>
	</form:form>
</div>
</body>

<%@include file="template/footer.jsp"%>
